<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%-- 
    JSP Name : left.jsp
    Description : 관리자 LNB 부분
    author Seung Hun
    since 2012. 7. 11.
    version 1.0
    Modification Information
       since          author              description
    ===========    =============    ===========================
    2012. 7. 11.     Seung Hun     최초 생성
--%>

        <div id="aside">
            <h1><span>${dept1MenuTitl }</span></h1>
            <ul id="lnb">
<c:choose>
    <c:when test="${mgrDept2Menu != null && !empty mgrDept2Menu }">
        <c:forEach var="lnb2Menu" items="${mgrDept2Menu }" varStatus="status">
            <c:if test="${fn:containsIgnoreCase(lnb2Menu.lnkUrl, dept1MenuCode) }">
                <c:if test="${fn:substring(ABLE_SPRING_CURRENT_URI,1,7) == fn:substring(lnb2Menu.lnkUrl,0,6) }">
                    <c:set var="dept2MenuTitl" value="${lnb2Menu.titl }" />
                    <c:set var="dept2MenuUrl" value="${lnb2Menu.lnkUrl }" />
                    <c:set var="lnbClass2Titl" value="atv" />
                </c:if>
                <li class="${lnbClass2Titl }">
                <c:if test="${lnb2Menu.dept2Cd == 'N' }">
                    <a href="#" onclick="alert('사용 권한이 없습니다.');return false;">${lnb2Menu.titl }</a>
                </c:if>
                <c:if test="${lnb2Menu.dept2Cd == 'Y' }">
                    <a href="${lnb2Menu.lnkUrl }.do">${lnb2Menu.titl }</a>
                </c:if>
                
                <c:choose>
                    <c:when test="${mgrDept3Menu != null && !empty mgrDept3Menu }">
                    <ul>
                        <c:forEach var="lnb3Menu" items="${mgrDept3Menu }" varStatus="status">
                            <c:if test="${fn:containsIgnoreCase(lnb3Menu.lnkUrl, fn:substring(lnb2Menu.lnkUrl,0,6)) }">
                                <c:if test="${fn:substring(lnb3Menu.lnkUrl,0,6) == 'nt_100' && fn:substring(ABLE_SPRING_CURRENT_URI,1,7) == 'nt_100' }">
                                    <c:if test="${lnb3Menu.lnkUrl == 'nt_100_01' && fn:substring(ABLE_SPRING_CURRENT_URI,8,10) < 7 }">
                                        <c:set var="dept3MenuTitl" value="${lnb3Menu.titl }" />
                                        <c:set var="dept3MenuUrl" value="${lnb3Menu.lnkUrl }" />
                                        <c:set var="lnbClass3Titl" value="atv" />
                                    </c:if>
                                    <c:if test="${lnb3Menu.lnkUrl == 'nt_100_07' && fn:substring(ABLE_SPRING_CURRENT_URI,8,10) > 6 }">
                                        <c:set var="dept3MenuTitl" value="${lnb3Menu.titl }" />
                                        <c:set var="dept3MenuUrl" value="${lnb3Menu.lnkUrl }" />
                                        <c:set var="lnbClass3Titl" value="atv" />
                                    </c:if>
                                </c:if>
                                <c:if test="${fn:substring(lnb3Menu.lnkUrl,0,6) == 'nt_200' && fn:substring(ABLE_SPRING_CURRENT_URI,1,7) == 'nt_200' }">
                                    <c:if test="${lnb3Menu.lnkUrl == 'nt_200_01' && fn:substring(ABLE_SPRING_CURRENT_URI,8,10) < 7 }">
                                        <c:set var="dept3MenuTitl" value="${lnb3Menu.titl }" />
                                        <c:set var="dept3MenuUrl" value="${lnb3Menu.lnkUrl }" />
                                        <c:set var="lnbClass3Titl" value="atv" />
                                    </c:if>
                                    <c:if test="${lnb3Menu.lnkUrl == 'nt_200_07' && fn:substring(ABLE_SPRING_CURRENT_URI,8,10) > 6 }">
                                        <c:set var="dept3MenuTitl" value="${lnb3Menu.titl }" />
                                        <c:set var="dept3MenuUrl" value="${lnb3Menu.lnkUrl }" />
                                        <c:set var="lnbClass3Titl" value="atv" />
                                    </c:if>
                                </c:if>
                                <c:if test="${fn:substring(lnb3Menu.lnkUrl,0,6) == 'nt_300' && fn:substring(ABLE_SPRING_CURRENT_URI,1,7) == 'nt_300' }">
                                    <c:if test="${lnb3Menu.lnkUrl == 'nt_300_01' && fn:substring(ABLE_SPRING_CURRENT_URI,8,10) < 5 }">
                                        <c:set var="dept3MenuTitl" value="${lnb3Menu.titl }" />
                                        <c:set var="dept3MenuUrl" value="${lnb3Menu.lnkUrl }" />
                                        <c:set var="lnbClass3Titl" value="atv" />
                                    </c:if>
                                    <c:if test="${lnb3Menu.lnkUrl == 'nt_300_06' && fn:substring(ABLE_SPRING_CURRENT_URI,8,10) >= 5 && fn:substring(ABLE_SPRING_CURRENT_URI,8,10) < 9 }">
                                        <c:set var="dept3MenuTitl" value="${lnb3Menu.titl }" />
                                        <c:set var="dept3MenuUrl" value="${lnb3Menu.lnkUrl }" />
                                        <c:set var="lnbClass3Titl" value="atv" />
                                    </c:if>
                                    <c:if test="${lnb3Menu.lnkUrl == 'nt_300_11' && fn:substring(ABLE_SPRING_CURRENT_URI,8,10) >= 8 && fn:substring(ABLE_SPRING_CURRENT_URI,8,10) < 17 }">
                                        <c:set var="dept3MenuTitl" value="${lnb3Menu.titl }" />
                                        <c:set var="dept3MenuUrl" value="${lnb3Menu.lnkUrl }" />
                                        <c:set var="lnbClass3Titl" value="atv" />
                                    </c:if>
                                    <c:if test="${lnb3Menu.lnkUrl == 'nt_300_17' && fn:substring(ABLE_SPRING_CURRENT_URI,8,10) >= 16 && fn:substring(ABLE_SPRING_CURRENT_URI,8,10) < 21 }">
                                        <c:set var="dept3MenuTitl" value="${lnb3Menu.titl }" />
                                        <c:set var="dept3MenuUrl" value="${lnb3Menu.lnkUrl }" />
                                        <c:set var="lnbClass3Titl" value="atv" />
                                    </c:if>
                                    <c:if test="${lnb3Menu.lnkUrl == 'nt_300_21' && fn:substring(ABLE_SPRING_CURRENT_URI,8,10) > 20 && fn:substring(ABLE_SPRING_CURRENT_URI,8,10) < 26 }">
                                        <c:set var="dept3MenuTitl" value="${lnb3Menu.titl }" />
                                        <c:set var="dept3MenuUrl" value="${lnb3Menu.lnkUrl }" />
                                        <c:set var="lnbClass3Titl" value="atv" />
                                    </c:if>
                                    <c:if test="${lnb3Menu.lnkUrl == 'nt_300_26' && fn:substring(ABLE_SPRING_CURRENT_URI,8,10) > 25 }">
                                        <c:set var="dept3MenuTitl" value="${lnb3Menu.titl }" />
                                        <c:set var="dept3MenuUrl" value="${lnb3Menu.lnkUrl }" />
                                        <c:set var="lnbClass3Titl" value="atv" />
                                    </c:if>
                                </c:if>
                                <c:if test="${fn:substring(lnb3Menu.lnkUrl,0,6) == 'ml_100' && fn:substring(ABLE_SPRING_CURRENT_URI,1,7) == 'ml_100' }">
                                    <c:if test="${lnb3Menu.lnkUrl == 'ml_100_01' && fn:substring(ABLE_SPRING_CURRENT_URI,8,10) < 3 }">
                                        <c:set var="dept3MenuTitl" value="${lnb3Menu.titl }" />
                                        <c:set var="dept3MenuUrl" value="${lnb3Menu.lnkUrl }" />
                                        <c:set var="lnbClass3Titl" value="atv" />
                                    </c:if>
                                    <c:if test="${lnb3Menu.lnkUrl == 'ml_100_03' && fn:substring(ABLE_SPRING_CURRENT_URI,8,10) > 2 }">
                                        <c:set var="dept3MenuTitl" value="${lnb3Menu.titl }" />
                                        <c:set var="dept3MenuUrl" value="${lnb3Menu.lnkUrl }" />
                                        <c:set var="lnbClass3Titl" value="atv" />
                                    </c:if>
                                </c:if>
                                <c:if test="${fn:substring(lnb3Menu.lnkUrl,0,6) != 'nt_100' && fn:substring(lnb3Menu.lnkUrl,0,6) != 'nt_200' && fn:substring(lnb3Menu.lnkUrl,0,6) != 'nt_300' && fn:substring(lnb3Menu.lnkUrl,0,6) != 'ml_100' && fn:substring(ABLE_SPRING_CURRENT_URI,1,7) == fn:substring(lnb3Menu.lnkUrl,0,6) }">
                                    <c:set var="dept3MenuTitl" value="${lnb3Menu.titl }" />
                                    <c:set var="dept3MenuUrl" value="${lnb3Menu.lnkUrl }" />
                                    <c:set var="lnbClass3Titl" value="atv" />
                                </c:if>
                                
                                <c:if test="${lnb3Menu.dept3Cd == 'Y' }">
                        <li class="${lnbClass3Titl }"><a href="${lnb3Menu.lnkUrl }.do">${lnb3Menu.titl }</a></li>
                                </c:if>
                                <c:if test="${lnb3Menu.dept3Cd == 'N' }">
                        <li class="${lnbClass3Titl }"><a href="#" onclick="alert('사용 권한이 없습니다.');return false;">${lnb3Menu.titl }</a></li>
                                </c:if>
                            </c:if>
                            <c:remove var="lnbClass3Titl" />
                        </c:forEach>
                    </ul>
                    </c:when>                
                </c:choose>
                
                </li>
                <c:remove var="lnbClass2Titl" />
            </c:if>
        </c:forEach>
    </c:when>
</c:choose>
            </ul>
        </div>